define(["jquery","bbcare","scprit/followup/app/comm/pageTab.js",
	"scprit/followup/app/question/question.servers.js"],function($,$bb,$pageTab,$questionServers){
	var servers = {};

	var URL = $bb.baseUrl("followup");
	var sessinonUserName = JSON.parse($bb.getSessionStorage("account")).alias;
	/*
	 * 获取随访任务id;
	 * */
	servers.getTaskId = function(params,callback,otherParams){
		$bb.ajax({
			url: URL + "followup/service/patient/patientTaskListQuery",
			data:JSON.stringify({
				data : params
			}),
			success: function(data){
				if(data.success){
					callback(data,otherParams);
				}
			}
		});
	};
	/*
	 * 获取建档问卷和内容
	 * */
	servers.getRecordQuestions = function(params,callback,otherParams){
		$bb.ajax({
			url: URL + "followup/service/patient/patientTaskContentDataQuery",
			data:JSON.stringify({
				data : params
			}),
			success: function(data){
				if(data.success){
					callback(data,otherParams);
				}
			}
		});
	};

	/*
	* 问卷提交保存
	* */
	servers.questionsToSave = function(params,callback,otherParams){
		$bb.ajax({
			url: URL + "followup/service/patient/patientTaskContentDataModify",
			data:JSON.stringify({
				data : params
			}),
			success: function(data){
				callback(data,otherParams);
			}
		});
	};

	return servers;
});